package de.stalinski.login;

public class Client {

    private String user, sessionID;
    private long timestamp;
    private long sessionDuration;

    public Client(String user, String sessionID) {
        this.timestamp = System.currentTimeMillis();
        this.user = user;
        this.sessionID = sessionID;
        this.sessionDuration = timestamp+2000;
    }

    public String getUser() {
        return user;
    }

    public String getSessionID() {
        return sessionID;
    }

    public long getSessionDuration() {
        return sessionDuration;
    }

    public void updateSessionDuration() {
        sessionDuration+=10000;
    }


    public void output() {
        System.out.println("----------------------------------------------");
        System.out.println("USER: "+user);
        System.out.println("SESSIONID: "+sessionID);
        System.out.println("TIMESTAMP: "+timestamp);
        System.out.println("ENDTIME: "+sessionDuration);
    }


}
